---
title: sync hooks
sidebar_label: hooks
---

import VersionLabel from '@site/src/components/Docs/VersionLabel';

<VersionLabel version="1.9.0" header />

The `moon sync hooks` command will manually sync hooks for the configured
[VCS](../../config/workspace#vcs), by generating and referencing hook scripts from the
[`vcs.hooks`](../../config/workspace#hooks) setting. Refer to the official
[VCS hooks](../../guides/vcs-hooks) guide for more information.

```shell
$ moon sync hooks
```

### Options

- `--clean` - Clean and remove previously generated hooks.
- `--force` - Bypass cache and force create hooks.

### Configuration

- [`vcs.hooks`](../../config/workspace#hooks) in `.moon/workspace.yml`
